package com.api.syh56.shengyunhui.common;

import java.math.BigDecimal;
import java.time.format.DateTimeFormatter;
import java.util.Map;

public interface Constants {

       /**
     * 
     * 用户身份
     *
     */
    public static class Role {
        public static final Short NONE = 0;
        //货主
        public static final Short SHIPER = 1;
        //专线
        public static final Short DRIVER = 2;
        public static final Short SUPERADMIN = 99;
    }

    /**
     * 实名认证状态
     */
    public static class AuthStatus {
        public static final Short UNAUTHENTICATED = 0;
        public static final Short UNDER_REVIEW = 1;
        public static final Short AUTHENTICATED = 2;
        public static final Short NOT_AUTHENTICATED = 3;
    }
    /**
     * 运费付款方式（ 1到付 2现付 3月结
     */
    public static class PayMethod {
        public static final Short PAY_LATER = 1;
        public static final Short PAY_NOW = 2;
        public static final Short MONTHLY_PAYMENT = 3;
    }


    /**
     * 报价状态
     */
    public static class QuoteStatus {
        // 已取消
        public static final Short CANCELLED = 0;
        // 进行中
        public static final Short IN_PROGRESS = 1;
        // 未选中
        public static final Short UNSELECTED = 2;
        // 已选中
        public static final Short SELECTED = 3;
        // 货主已撤回
        public static final Short SHIPPER_RETRACTED = 4;
        // 确认报价中
//        public static final Short CONFIRMING = 5;
    }

    /**
     * 专线对运单报价状态
     */
    public static class WaybillQuote{
        /**
         * 未报价
         */
        public static final Short UNQUOTE = 0;

        /**
         * 已报价
         */
        public static final Short IS_QUOTE = 1;
    }

    /**
     * 运单状态
     */
    public static class WaybillStatus {
        // 已取消
        public static final Short CANCELLED = 0;
        // 待接单
        public static final Short AWAIT_QUOTE = 1;
        // 已接单（已付定金）
        public static final Short DEPOSIT_PAID = 2;
        // 待结算
        public static final Short AWAIT_SETTLEMENT = 3;
        // 已结算
        public static final Short SETTLED = 4;
        // 待报价
        public static final Short WAIT_QUOTE = 5;
    }

    public static class WayBillLock{
        //解锁
        public static final Short UNLOCK = 0;
        //加锁
        public static final Short LOCK = 1;
    }

    public static class WayBillPayType{
        /**
         * 定金
         */
        public static final short DEPOSIT = 1;   // 定金
        /**
         * 运费
         */
        public static final short SHIPFEE = 2;      // 运费
    }

    /**
     * 运输状态
     */
    public static class DeliveryStatus {
        // 已取消
        public static final Short CANCELLED = 0;
        // 报价
        public static final Short QUOTE = 1;
        //待装货
        public static final Short AWAIT_LOAD = 2;
        // 运输中
        public static final Short TRANSPORTING = 3;
        // 已到达
        public static final Short DELIVERED = 4;
        // 已结算
        public static final Short SETTLED = 5;
        // 默认状态
        public static final Short DEFAULT = 10;

    }


    public static class PaymentStatus {

        public static final short UN_PAID = 0;      // 待支付
        public static final short PAID = 1;   // 支付完成
        public static final short FAILED = -1;      // 支付失败
        public static final short REFUNDED = 2;     // 已退款
    }

    public static class AmountType {

        public static final short DEPOSIT = 1;   // 定金
        public static final short SHIPFEE = 2;      // 运费
        public static final short DEPOSITANDSHIPFEE = 3;     // 定金和运费

    }

    public static class DateTimeFormatterType{
        // 格式化为RFC 3339格式
        public static final DateTimeFormatter RFC3339 = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX");

        public static final DateTimeFormatter ISO8601   = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

        public static final DateTimeFormatter ISO8601_yMd   = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    }

    /**
     * 税率
     */
    public static class taxRate{
        public static final BigDecimal ZERO = BigDecimal.valueOf(0);
        public static final BigDecimal SIX = BigDecimal.valueOf(0.06);
        public static final BigDecimal NINE = BigDecimal.valueOf(0.09);
    }

    /**
     * 服务费
     */
    public static class service{
        public static final BigDecimal FIVE = BigDecimal.valueOf(0.05);
    }

    /**
     * 单位
     */
    public static class unit{
        //份
        public static final String COPIES = "份";
        //单
        public static final String SINGLE = "单";

    }

    /**
     * 开票状态
     */
    public static class invoiceState{
        /**
         * 未开票
         */
        public static final Short NOT_INVOICED = 0;//未开票

        /**
         * 已申请
         */
        public static final Short APPLIED = 1;
        /**
         * 已开票
         */
        public static final Short INVOICED = 2;//已开票
        /**
         * 已报废
         */
        public static final Short SCRAPPED = 3;//已报废
        /**
         * 红冲
         */
        public static final Short RED = 4;//红冲
    }

    /**
     * 发票类型
     */
    public static class invoiceType{
        /**
         * 专票
         */
        public static final Short SPECIAL_TICKET = 0;
        /**
         * 普票
         */
        public static final Short GENERAL_TICKET = 1;
    }

    /**
     * 提现状态
     */
    public static class WithdrawalStatus{
        /**
         * 提现取消
         */
        public static final Short CANCELLED = 0;
        /**
         * 审核进行中
         */
        public static final Short IN_PROGRESS = 1;
        /**
         * 提现成功
         */
        public static final Short SUCCESS = 2;
        /**
         * 提现失败
         */
        public static final Short FAILED = 3;
    }

    /**
     * 管理权限
     */
    public static class AdminRole{
        /**
         * 未认证
         */
        public static final Short NONE = 0;
        /**
         * 超级管理员 1
         */
        public static final Short SUP_ADMIN = 1;
        /**
         * 管理员 2
         */
        public static final Short ADMIN = 2;
        /**
         * 客服 3
         */
        public static final Short SERVICER = 3;
    }

    /**
     * 管理员联系专线用户状态
     */
    public static class CONTACT{
        /**
         * 未联系
         */
        public static final Short UN_CONTACT= 0;

        /**
         * 已联系
         */
        public static final Short IS_CONTACT = 1;
    }


    /**
     * 在职状态
     */
    public static class jobStatus{
        /**
         * 离职
         */
        public static final Short FORMER = 0;
        /**
         * 在职
         */
        public static final Short CURRENT = 1;
    }

    /**
     * 优惠券编码
     */
    public static class couponCode{
        public static final Short TEN = 1001;//10
        public static final Short TWENTY = 1002;//20
        public static final Short FIFTY = 1003;//50
        public static final Short HUNDRED = 1004;//100
        public static final Short TWO_HUNDRED = 1005;//200
        public static final Short FIVE_HUNDRED = 1006;//500
    }

    /**
     * 优惠券状态
     */
    public static class couponStatus{
        /**
         * 已过期
         */
        public static final Short EXPIRED = 0;

        /**
         * 有效
         */
        public static final Short EFFECTIVE = 1;
        /**
         * 已使用
         */
        public static final Short USED = 2;

        /**
         * 使用中
         */
//        public static final Short IN_USE = 3;


    }

    /**
     * webSocket调用接口
     */
    public static class webSocket{
        /**
         * 发货
         */
        public static final Short ORDER_NEW = 0;
        /**
         * 发货、报价、取消
         */
        public static final Short WAYBILL = 1;
        /**
         * 发票
         */
        public static final Short INVOICE_NEW = 2;
        /**
         * 提现
         */
        public static final Short WITHDRAW_NEW = 3;
        /**
         * 联系状态
         */
        public static final Short UPDATE_CONTACT = 4;
//        public static final Short ORDER = 5;
    }

    /**
     * 优惠券类型
     */
    public static class couponType{
        /**
         * 满减券
         */
        public static final Short FULL_REDUCTION = 0;

        /**
         * 折扣券
         */
        public static final Short DISCOUNT = 1;
    }
}
